package com.ghd.dataviz.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author ：ghd
 * @date ：Created in 2020-03-19 21:11
 * @description：
 * @modified By：
 * @version: $
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DatavizMessage<T> {
    private String type;
    private T data;

    public static <T> DatavizMessage<T> create(String type, T data) {
        return new DatavizMessage<>(type, data);
    }
}
